package com.sp.app.service.impl;

import com.sp.app.dao.UserMapper;
import com.sp.app.domain.User;
import com.sp.app.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("UserService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public List<User> QueryAllTeacher(User user) {
        return userMapper.QueryAllTeacher(user);
    }

    @Override
    public List<User> QueryAllStudent(User user) {
        return userMapper.QueryAllStudent(user);
    }

    @Override
    public List<User> QueryAll(User user) {
        return userMapper.QueryAll(user);
    }

    @Override
    public void deleteByPrimaryKey(String id) {
        userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void insert(User record) {
        userMapper.insert(record);
    }

    @Override
    public User selectByPrimaryKey(String id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public void updateByPrimaryKey(User record) {
        userMapper.updateByPrimaryKey(record);
    }
}
